package com.epoint.ServletAPI;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;


// @WebFilter(urlPatterns = {"/myfilter/*"}) 方式一，结合servlet3.0的方式，方法二 通过Springboot注入的方式
public class MyFilter implements Filter {


    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("mufilter进来了~~~~~");
        filterChain.doFilter(servletRequest, servletResponse);
    }

    @Override
    public void destroy() {

    }
}
